package com.electric.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.electric.entity.CustomRepairRecord;
import com.electric.entity.RepairRecord;

/**
 * <p>
 * 故障记录 Mapper 接口
 * </p>
 *
 * @author zhangbin
 * @since 2018-08-28
 */
public interface RepairRecordMapper extends BaseMapper<RepairRecord> {
	List<CustomRepairRecord> selectListPage(Page<CustomRepairRecord> page ,@Param("param") Map<String,Object> param);
	
	CustomRepairRecord queryCustomRepairRecord(@Param("seqId") String seqId);
	
	/**
	 * 根据用户和时间段统计饼图
	 * @param statisticsType
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	List<Map<String,Object>> statisticsCustomerPie(Map<String,Object> params);
	
	/**
	 * 根据电压等级和时间段统计饼图
	 * @param statisticsType
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	List<Map<String,Object>> statisticsVoltageLevelPie(Map<String,Object> params);
	
	/**
	 * 根据维修类型和时间段统计饼图
	 * @param statisticsType
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	List<Map<String,Object>> statisticsRepairTypePie(Map<String,Object> params);
	
	/**
	 * 根据电压等级和时间段统计折线图
	 * @param statisticsType
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	List<Map<String,Object>> statisticsVoltageLevelLine(Map<String,Object> params);
	
	/**
	 * 根据维修类型和时间段统计折线图
	 * @param statisticsType
	 * @param startDate
	 * @param endDate
	 * @return
	 */
	List<Map<String,Object>> statisticsRepairTypeLine(Map<String,Object> params);
	
	/**
	 * 根据电压等级用户统计失压情况
	 * @param params
	 * @return
	 */
	List<Map<String,Object>> statisticsCustomerVoltageLoss(Map<String,Object> params);
}
